package com.aorise.model.request;

import com.aorise.utils.DataValidationUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @Auther: zhouhao
 * @Date: 2019/6/3
 * @Description: 修改密码入参
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value="updatePwd对象",description="修改密码对象")
public class UpdatePwdReq implements Serializable {

    @ApiModelProperty(value = "角色ID",example = "15",dataType = "int")
    @NotNull(message = "用户ID不能为空")
    Integer userId;

    @ApiModelProperty(value = "原密码",example = "666666",dataType = "String")
    @NotBlank(message = "原密码不支持为空，请完善资料")
    @Pattern(regexp = DataValidationUtil.V_PASSWORD,message = "密码范围为6到16位且不能包含空格和特殊字符")
    String oldPwd;

    @ApiModelProperty(value = "新密码One",example = "111111",dataType = "String")
    @NotBlank(message = "新密码不支持为空，请完善资料")
    @Pattern(regexp = DataValidationUtil.V_PASSWORD,message = "密码范围为6到16位且不能包含空格和特殊字符")
    String newPwdOne;

    @ApiModelProperty(value = "新密码Two",example = "111111",dataType = "String")
    @NotBlank(message = "新密码不支持为空，请完善资料")
    @Pattern(regexp = DataValidationUtil.V_PASSWORD,message = "密码范围为6到16位且不能包含空格和特殊字符")
    String newPwdTwo;

    String token;
}
